# 实现一个多线程程序
import requests
import requests
from threading import Thread
from multiprocessing import  Process
def request_bilibili():
    url = "https://www.bilibili.com/v/douga/?spm_id_from=333.851.b_7072696d6172794368616e6e656c4d656e75.1"
    body = ""
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0"
    }
    response = requests.get(url=url, headers=headers)
    print(response)

if __name__ == "__main__":
    for i in range(10):
        t = Thread(target=request_bilibili)
        t.start()

#转换为多进程
if __name__ == "__main__":
    for i in range(10):
        p = Process(target=request_bilibili)
        p.start()
